
package vn.aptech.project.control;
import vn.aptech.project.model.dao.*;
import java.io.IOException;
import java.sql.SQLException;
import vn.aptech.project.model.dto.*;
import java.io.FileNotFoundException;
import java.util.Vector;

public class  Customer_BLL {

private Customer_DAO   obj ;


public Customer_BLL() throws ClassNotFoundException, SQLException, IOException {
     this.obj   = new  Customer_DAO();
}
public int getCustomerIdByCust_name(String cust_name) throws SQLException, FileNotFoundException, IOException{
    return obj.getCustomerIdByCust_name(cust_name);
}

public Vector selectCustomer() throws SQLException {
 return  obj.selectall();
}
public Vector selectCustomerByName(String cust_name) throws SQLException {
 return  obj.selectByName(cust_name);
}


public int insertCustomer(Customer_DTO object) throws SQLException {
 return  obj.insert(object);
}


public int updateCustomer(Customer_DTO object) throws SQLException {
 return  obj.update(object);
}


public int deleteCustomer(int Customerid) throws SQLException {
 return  obj.delete(Customerid);
}
}
